import 'package:flutter/material.dart';
import 'package:ducafe_ui_core/ducafe_ui_core.dart';
import 'package:google_fonts/google_fonts.dart';

import '../../function/routes/app_route_manager.dart';
import '../../function/states/post_state.dart';
import '../../function/states/user_state.dart';
import '../../function/states/follow_state.dart';
import '../../function/models/post_model.dart';
import '../../function/models/comment_model.dart';
import '../../function/widgets/animated_tap_widget.dart';
import '../../function/widgets/login_dialog.dart';
import '../../function/widgets/report_dialog.dart';
import '../../function/widgets/border_widget.dart';
import '../../function/widgets/toast_widget.dart';
import '../video/video_player_page.dart';
import 'package:easy_image_viewer/easy_image_viewer.dart';

/// 动态详情页面
class PostDetailPage extends StatefulWidget {
  final String postId;

  const PostDetailPage({super.key, required this.postId});

  @override
  State<PostDetailPage> createState() => _PostDetailPageState();
}

class _PostDetailPageState extends State<PostDetailPage>
    with TickerProviderStateMixin {
  late PostModel _post;
  final TextEditingController _commentController = TextEditingController();
  int _currentMediaIndex = 0; // 当前显示的媒体索引

  late AnimationController _imageAnimationController;
  late AnimationController _borderAnimationController;
  late Animation<double> _imageFadeAnimation;
  late PageController _pageController;

  @override
  void initState() {
    super.initState();
    _initializePostData();

    // 初始化动画控制器
    _imageAnimationController = AnimationController(
      duration: const Duration(milliseconds: 300),
      vsync: this,
    );

    _borderAnimationController = AnimationController(
      duration: const Duration(milliseconds: 200),
      vsync: this,
    );

    // 初始化动画
    _imageFadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
      CurvedAnimation(
        parent: _imageAnimationController,
        curve: Curves.easeInOut,
      ),
    );

    // 启动初始图片动画
    _imageAnimationController.forward();

    // 初始化页面控制器
    _pageController = PageController(initialPage: _currentMediaIndex);

    // 订阅动态列表变化
    PostState.postListBeacon.subscribe((postList) {
      if (mounted) {
        setState(() {});
      }
    });

    // 订阅用户收藏状态变化
    PostState.userFavoritePostsMapBeacon.subscribe((favoritesMap) {
      if (mounted) {
        setState(() {});
      }
    });

    // 订阅用户关注状态变化
    FollowState.userFollowsMapBeacon.subscribe((followsMap) {
      if (mounted) {
        setState(() {});
      }
    });
  }

  @override
  void dispose() {
    _commentController.dispose();
    _imageAnimationController.dispose();
    _borderAnimationController.dispose();
    _pageController.dispose();
    super.dispose();
  }

  /// 初始化动态数据
  void _initializePostData() {
    final post = PostState.getPostById(widget.postId);
    if (post != null) {
      _post = post;
    } else {
      // 如果找不到动态，返回上一页
      AppRouteManager.goBack();
    }
  }

  /// 切换到指定媒体
  void _switchToMedia(int index) {
    if (index == _currentMediaIndex) return;

    // 使用PageController切换页面
    _pageController.animateToPage(
      index,
      duration: const Duration(milliseconds: 300),
      curve: Curves.easeInOut,
    );

    // 触发边框动画
    _borderAnimationController.forward().then((_) {
      _borderAnimationController.reset();
    });
  }

  /// 格式化时间显示
  String _formatTimeAgo(DateTime publishTime) {
    final now = DateTime.now();
    final difference = now.difference(publishTime);

    if (difference.inMinutes < 1) {
      return 'Just now';
    } else if (difference.inMinutes < 60) {
      return '${difference.inMinutes} Min Ago';
    } else if (difference.inHours < 24) {
      return '${difference.inHours} Hour${difference.inHours > 1 ? 's' : ''} Ago';
    } else if (difference.inDays < 7) {
      return '${difference.inDays} Day${difference.inDays > 1 ? 's' : ''} Ago';
    } else if (difference.inDays < 30) {
      final weeks = (difference.inDays / 7).floor();
      return '$weeks Week${weeks > 1 ? 's' : ''} Ago';
    } else if (difference.inDays < 365) {
      final months = (difference.inDays / 30).floor();
      return '$months Month${months > 1 ? 's' : ''} Ago';
    } else {
      final years = (difference.inDays / 365).floor();
      return '$years Year${years > 1 ? 's' : ''} Ago';
    }
  }

  /// 检查当前用户是否已收藏
  bool _isCurrentUserFavorite() {
    if (!UserState.checkLoginStatus()) {
      return false;
    }

    final currentUser = UserState.getCurrentUserInfo();
    if (currentUser != null) {
      return PostState.isPostFavorited(currentUser.userId, _post.postId);
    }
    return false;
  }

  /// 检查当前用户是否关注了指定用户
  bool _isCurrentUserFollowing(String userId) {
    if (!UserState.checkLoginStatus()) {
      return false;
    }

    final currentUser = UserState.getCurrentUserInfo();
    if (currentUser != null) {
      return FollowState.isFollowing(currentUser.userId, userId);
    }
    return false;
  }

  /// 处理关注操作
  void _handleFollowAction(String userId) {
    if (!UserState.checkLoginStatus()) {
      LoginDialog.show(
        context,
        title: 'Login Required',
        message: 'Please login to follow users',
      );
      return;
    }

    final currentUser = UserState.getCurrentUserInfo();
    if (currentUser != null) {
      // 检查是否尝试关注自己
      if (currentUser.userId == userId) {
        ToastWidget.showWarning('You cannot follow yourself');
        return;
      }

      FollowState.toggleFollow(currentUser.userId, userId);
    }
  }

  /// 处理用户头像点击
  void _handleUserAvatarTap(String userId) {
    if (userId.isEmpty) return;

    final currentUser = UserState.getCurrentUserInfo();
    if (currentUser != null && currentUser.userId == userId) {
      // 如果是当前用户，跳转到自己的用户中心
      AppRouteManager.navigateToUserCenter();
    } else {
      // 如果是其他用户，跳转到其他用户主页
      AppRouteManager.navigateToOtherUserCenter(userId);
    }
  }

  /// 处理媒体点击
  void _handleMediaTap() {
    if (_post.isVideoAtIndex(_currentMediaIndex)) {
      // 如果是视频，跳转到视频播放页面
      final videoUrl = _post.mediaUrls[_currentMediaIndex];

      // 检测视频类型
      VideoResourceType? videoType;
      if (videoUrl.startsWith('http://') || videoUrl.startsWith('https://')) {
        videoType = VideoResourceType.network;
      } else if (videoUrl.startsWith('assets/')) {
        videoType = VideoResourceType.asset;
      } else {
        videoType = VideoResourceType.local;
      }

      AppRouteManager.navigateToVideoPlayer(videoUrl, videoType: videoType);
    } else {
      // 如果是图片，显示图片预览
      _showImagePreview();
    }
  }

  /// 显示图片预览
  void _showImagePreview() {
    // 获取所有图片URL
    List<String> imageUrls = [];
    for (int i = 0; i < _post.mediaUrls.length; i++) {
      if (!_post.isVideoAtIndex(i)) {
        imageUrls.add(_post.mediaUrls[i]);
      }
    }

    if (imageUrls.isNotEmpty) {
      // 找到当前图片在图片列表中的索引
      int currentImageIndex = 0;
      for (int i = 0; i <= _currentMediaIndex; i++) {
        if (!_post.isVideoAtIndex(i)) {
          if (i == _currentMediaIndex) break;
          currentImageIndex++;
        }
      }

      showImageViewer(
        context,
        AssetImage(imageUrls[currentImageIndex]),
        useSafeArea: true,
        doubleTapZoomable: true,
        swipeDismissible: true,
      );
    }
  }

  /// 处理评论提交
  void _handleCommentSubmit() {
    if (!UserState.checkLoginStatus()) {
      LoginDialog.show(
        context,
        title: 'Login Required',
        message: 'Please login to add comments',
      );
      return;
    }

    final content = _commentController.text.trim();
    if (content.isEmpty) return;

    PostState.addComment(
      postId: _post.postId,
      userId: 'admin',
      content: content,
    );
    _commentController.clear();
  }

  /// 处理收藏操作
  void _handleFavoriteAction() {
    if (!UserState.checkLoginStatus()) {
      LoginDialog.show(
        context,
        title: 'Login Required',
        message: 'Please login to add favorites',
      );
      return;
    }

    final currentUser = UserState.getCurrentUserInfo();
    if (currentUser != null) {
      PostState.togglePostFavorite(currentUser.userId, _post.postId);
    }
  }

  /// 显示评论举报弹窗
  void _showCommentReportDialog(String commentId) {
    ReportDialog.show(
      context,
      onReportSuccess: () {
        // 举报成功后删除评论
        PostState.removeComment(_post.postId, commentId);
        ToastWidget.showSuccess('You won\'t see this again.');
      },
    );
  }

  /// 显示举报弹窗
  void _showReportDialog() {
    ReportDialog.show(
      context,
      onReportSuccess: () {
        // 删除动态
        PostState.removePost(_post.postId);
        ToastWidget.showSuccess('You won\'t see this again.');
        // 返回上一页
        AppRouteManager.goBack();
      },
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      extendBody: true,
      body: Container(
        decoration: const BoxDecoration(
          image: DecorationImage(
            image: AssetImage('assets/images/common_bg.png'),
            fit: BoxFit.cover,
          ),
        ),
        child: SafeArea(
          child: Column(
            children: [
              // 顶部导航栏
              _buildTopBar(),

              SizedBox(height: 12.h),

              // 主要内容区域
              Expanded(
                child: SingleChildScrollView(
                  child: Column(
                    children: [
                      // 用户信息栏
                      _buildUserInfo(),

                      SizedBox(height: 16.h),

                      // 媒体展示区域
                      _buildMediaSection(),

                      SizedBox(height: 16.h),

                      // 动态详情文字
                      _buildPostContent(),

                      SizedBox(height: 20.h),

                      // 评论区域
                      _buildCommentsSection(),

                      SizedBox(height: 100.h), // 为底部固定栏留出空间
                    ],
                  ),
                ),
              ),

              // 底部固定栏
              _buildBottomBar(),
            ],
          ),
        ),
      ),
    );
  }

  /// 构建顶部导航栏
  Widget _buildTopBar() {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h),
      child: Row(
        children: [
          // 返回按钮
          GestureDetector(
            onTap: () => AppRouteManager.goBack(),
            child: Row(
              children: [
                Icon(Icons.chevron_left, color: Colors.white, size: 26.w),
                SizedBox(width: 12.w),
                // 标题
                Text('Detail Page')
                    .fontSize(18.sp)
                    .textColor(Colors.white)
                    .fontFamily(
                      GoogleFonts.quicksand(
                        fontWeight: FontWeight.w700,
                      ).fontFamily,
                    )
                    .fontWeight(FontWeight.w700)
                    .textAlignment(TextAlign.center),
              ],
            ),
          ),

          const Spacer(),

          // 举报按钮
          AnimatedTapWidget(
            onTap: () => _showReportDialog(),
            child: Image.asset(
              'assets/images/report.png',
              width: 24.w,
              height: 24.w,
            ),
          ),
        ],
      ),
    );
  }

  /// 构建用户信息栏
  Widget _buildUserInfo() {
    final user = UserState.queryUserById(_post.userId);
    final userName = user?.userName ?? 'Unknown User';

    return Container(
          padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.h),
          decoration: BoxDecoration(
            color: const Color(0xFF663507),
            borderRadius: BorderRadius.circular(28.r),
          ),
          child: Row(
            children: [
              // 用户头像
              AnimatedTapWidget(
                onTap: () => _handleUserAvatarTap(user?.userId ?? ''),
                child: Container(
                  width: 40.w,
                  height: 40.w,
                  decoration: BoxDecoration(shape: BoxShape.circle),
                  child: ClipOval(
                    child: Image.asset(
                      user?.avatar ?? 'assets/images/avatar1.png',
                      fit: BoxFit.cover,
                    ),
                  ),
                ),
              ),

              SizedBox(width: 12.w),

              // 用户名和时间
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(userName)
                        .fontSize(16.sp)
                        .textColor(Colors.white)
                        .fontWeight(FontWeight.w700)
                        .fontFamily(
                          GoogleFonts.quicksand(
                            fontWeight: FontWeight.w700,
                          ).fontFamily,
                        ),
                    Text(_formatTimeAgo(_post.publishTime))
                        .fontSize(12.sp)
                        .textColor(Colors.white)
                        .fontFamily(
                          GoogleFonts.quicksand(
                            fontWeight: FontWeight.w500,
                          ).fontFamily,
                        ),
                  ],
                ),
              ),

              // 关注按钮
              AnimatedTapWidget(
                onTap: () => _handleFollowAction(user?.userId ?? ''),
                child: Container(
                  padding: EdgeInsets.symmetric(
                    horizontal: 12.w,
                    vertical: 6.h,
                  ),
                  decoration: BoxDecoration(
                    color:
                        _isCurrentUserFollowing(user?.userId ?? '')
                            ? const Color(0xFFFF8A3C)
                            : Colors.white,
                    borderRadius: BorderRadius.circular(20.r),
                  ),
                  child: Row(
                    mainAxisSize: MainAxisSize.min,
                    children: [
                      Image.asset(
                        _isCurrentUserFollowing(user?.userId ?? '')
                            ? 'assets/images/unfollow.png'
                            : 'assets/images/follow.png',
                        width: 16.w,
                        height: 16.w,
                      ),
                      SizedBox(width: 4.w),
                      Text(
                            _isCurrentUserFollowing(user?.userId ?? '')
                                ? 'Unfollow'
                                : 'Follow',
                          )
                          .fontSize(14.sp)
                          .textColor(
                            _isCurrentUserFollowing(user?.userId ?? '')
                                ? Colors.white
                                : const Color(0xFFFF8A3C),
                          )
                          .fontWeight(FontWeight.w700)
                          .fontFamily(
                            GoogleFonts.quicksand(
                              fontWeight: FontWeight.w700,
                            ).fontFamily,
                          ),
                    ],
                  ),
                ),
              ),
            ],
          ),
        )
        .configBorderWidget(
          borderColor: Colors.white,
          borderWidth: 1.w,
          borderRadius: 28.r,
        )
        .paddingHorizontal(16.w);
  }

  /// 构建媒体展示区域
  Widget _buildMediaSection() {
    return Container(
      margin: EdgeInsets.symmetric(horizontal: 16.w),
      child: _buildMainImage(),
    );
  }

  /// 构建主图
  Widget _buildMainImage() {
    return AspectRatio(
      aspectRatio: 343 / 258,
      child: Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(16.r),
          boxShadow: [
            BoxShadow(
              color: Colors.black.withOpacity(0.3),
              blurRadius: 10.r,
              offset: Offset(0, 5.h),
            ),
          ],
        ),
        child: ClipRRect(
          borderRadius: BorderRadius.circular(16.r),
          child: Stack(
            children: [
              // 背景图片
              Positioned.fill(
                child: GestureDetector(
                  onTap: () => _handleMediaTap(),
                  child: PageView.builder(
                    controller: _pageController,
                    scrollDirection: Axis.vertical, // 设置为垂直滑动
                    onPageChanged: (index) {
                      setState(() {
                        _currentMediaIndex = index;
                      });
                      // 触发边框动画
                      _borderAnimationController.forward().then((_) {
                        _borderAnimationController.reset();
                      });
                    },
                    itemCount: _post.mediaUrls.length,
                    itemBuilder: (context, index) {
                      return FadeTransition(
                        opacity: _imageFadeAnimation,
                        child: Image.asset(
                          _post.isVideoAtIndex(index)
                              ? _post.getVideoThumbnailAtIndex(index) ??
                                  _post.mediaUrls[index]
                              : _post.mediaUrls[index],
                          fit: BoxFit.cover,
                        ),
                      );
                    },
                  ),
                ),
              ),

              // 视频播放按钮
              if (_post.isVideoAtIndex(_currentMediaIndex))
                Positioned.fill(
                  child: Center(
                    child: GestureDetector(
                      onTap: () => _handleMediaTap(),
                      child: Center(
                        child: Image.asset(
                          'assets/images/play.png',
                          width: 60.w,
                          height: 60.w,
                        ),
                      ),
                    ),
                  ),
                ),

              // 缩略图索引覆盖层
              if (_post.mediaUrls.length > 1)
                Positioned(
                  bottom: 12.w,
                  right: 12.w,
                  child: _buildThumbnailIndex(),
                ),
            ],
          ),
        ),
      ),
    );
  }

  /// 构建缩略图索引
  Widget _buildThumbnailIndex() {
    return Container(
      padding: EdgeInsets.all(6.w),
      decoration: ShapeDecoration(
        color: Colors.black.withValues(alpha: 0.20),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(12.r),
        ),
      ),
      width: 70.w,
      child: Column(
        children:
            _post.mediaUrls.asMap().entries.map((entry) {
              final index = entry.key;
              final mediaUrl = entry.value;

              return Container(
                margin: EdgeInsets.only(bottom: 6.h),
                child: AspectRatio(
                  aspectRatio: 1,
                  child: GestureDetector(
                    onTap: () {
                      _switchToMedia(index);
                    },
                    child: Container(
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(6.r),
                        border: Border.all(
                          color:
                              index == _currentMediaIndex
                                  ? const Color(0xFFFF8A3C)
                                  : Colors.white,
                          width: index == _currentMediaIndex ? 2.w : 2.w,
                        ),
                        boxShadow: [
                          BoxShadow(
                            color: Colors.black.withOpacity(0.3),
                            blurRadius: 4.r,
                            offset: Offset(0, 2.h),
                          ),
                        ],
                      ),
                      child: Stack(
                        children: [
                          // 缩略图
                          Positioned.fill(
                            child: ClipRRect(
                              borderRadius: BorderRadius.circular(6.r),
                              child: Image.asset(
                                _post.isVideoAtIndex(index)
                                    ? _post.getVideoThumbnailAtIndex(index) ??
                                        mediaUrl
                                    : mediaUrl,
                                fit: BoxFit.cover,
                              ),
                            ),
                          ),

                          // 视频播放图标
                          if (_post.isVideoAtIndex(index))
                            Positioned.fill(
                              child: Center(
                                child: Image.asset(
                                  'assets/images/play.png',
                                  width: 12.w,
                                  height: 12.w,
                                ),
                              ),
                            ),
                        ],
                      ),
                    ),
                  ),
                ),
              );
            }).toList(),
      ),
    );
  }

  /// 构建动态内容
  Widget _buildPostContent() {
    return Container(
      margin: EdgeInsets.symmetric(horizontal: 16.w),
      child: Text(_post.content, style: TextStyle(height: 1.53))
          .fontSize(15.sp)
          .textColor(Colors.white)
          .fontFamily(
            GoogleFonts.quicksand(fontWeight: FontWeight.w600).fontFamily,
          )
          .fontWeight(FontWeight.w600),
    );
  }

  /// 构建评论区域
  Widget _buildCommentsSection() {
    final comments = PostState.getPostComments(_post.postId);

    return Container(
      width: double.infinity,
      margin: EdgeInsets.symmetric(horizontal: 16.w),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          // 评论标题
          Text('${comments.length} Comments In Total')
              .fontSize(14.sp)
              .textColor(Colors.white)
              .fontWeight(FontWeight.w700)
              .fontFamily(
                GoogleFonts.quicksand(fontWeight: FontWeight.w700).fontFamily,
              ),

          SizedBox(height: 16.h),

          // 评论列表或空状态
          if (comments.isEmpty)
            // 空状态显示
            Center(
              child: Column(
                children: [
                  SizedBox(height: 40.h),
                  Image.asset(
                    'assets/images/empty.png',
                    width: 120.w,
                    height: 120.w,
                  ),
                  SizedBox(height: 16.h),
                  Text('No comments yet')
                      .fontSize(14.sp)
                      .textColor(Colors.white.withOpacity(0.6))
                      .fontWeight(FontWeight.w400)
                      .fontFamily(
                        GoogleFonts.quicksand(
                          fontWeight: FontWeight.w400,
                        ).fontFamily,
                      ),
                  SizedBox(height: 40.h),
                ],
              ),
            )
          else
            // 评论列表
            ...comments.map((comment) => _buildCommentItem(comment)),
        ],
      ),
    );
  }

  /// 构建单个评论项
  Widget _buildCommentItem(CommentModel comment) {
    final user = UserState.queryUserById(comment.userId);
    final userName = user?.userName ?? 'Unknown User';

    return Container(
      margin: EdgeInsets.only(bottom: 16.h),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          // 用户头像
          AnimatedTapWidget(
            onTap: () => _handleUserAvatarTap(user?.userId ?? ''),
            child: Container(
              width: 36.w,
              height: 36.w,
              decoration: BoxDecoration(shape: BoxShape.circle),
              child: ClipOval(
                child: Image.asset(
                  user?.avatar ?? 'assets/images/avatar1.png',
                  fit: BoxFit.cover,
                ),
              ),
            ),
          ),

          SizedBox(width: 12.w),

          // 评论内容
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(userName)
                    .fontSize(15.sp)
                    .textColor(Colors.white)
                    .fontWeight(FontWeight.w600)
                    .fontFamily(
                      GoogleFonts.quicksand(
                        fontWeight: FontWeight.w600,
                      ).fontFamily,
                    ),
                SizedBox(height: 4.h),
                Text(comment.content, style: TextStyle(height: 1.38))
                    .fontSize(13.sp)
                    .textColor(Colors.white)
                    .fontFamily(
                      GoogleFonts.quicksand(
                        fontWeight: FontWeight.w400,
                      ).fontFamily,
                    ),
              ],
            ),
          ),

          // 举报评论按钮
          GestureDetector(
            onTap: () => _showCommentReportDialog(comment.commentId),
            child: Image.asset(
              'assets/images/report.png',
              width: 20.w,
              height: 20.w,
            ),
          ),
        ],
      ),
    );
  }

  /// 构建底部固定栏
  Widget _buildBottomBar() {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h),
      decoration: BoxDecoration(color: Colors.transparent),
      child: Row(
        children: [
          // 评论输入框
          Expanded(
            child: Container(
              height: 40.h,
              padding: EdgeInsets.only(left: 16.w, right: 8.w),
              decoration: BoxDecoration(
                color: const Color(0x33FF8A3C),
                borderRadius: BorderRadius.circular(20.r),
                border: Border.all(
                  color: Colors.white.withOpacity(0.2),
                  width: 1.w,
                ),
              ),
              child: TextField(
                controller: _commentController,
                style: TextStyle(color: Colors.white, fontSize: 14.sp),
                decoration: InputDecoration(
                  hintText: 'Add a comment...',
                  hintStyle: TextStyle(
                    color: Colors.white.withOpacity(0.6),
                    fontSize: 14.sp,
                  ),
                  border: InputBorder.none,
                  suffixIcon: AnimatedTapWidget(
                    onTap: () => _handleCommentSubmit(),
                    child: Padding(
                      padding: EdgeInsets.all(8.w),
                      child: Image.asset(
                        'assets/images/fasong.png',
                        width: 16.w,
                        height: 16.w,
                      ),
                    ),
                  ),
                ),
              ),
            ),
          ),

          SizedBox(width: 12.w),

          // 收藏按钮
          AnimatedTapWidget(
            onTap: () => _handleFavoriteAction(),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Image.asset(
                  _isCurrentUserFavorite()
                      ? 'assets/images/like-fill.png'
                      : 'assets/images/like.png',
                  width: 20.w,
                  height: 20.w,
                ),
                SizedBox(width: 4.w),
                Text(
                      '${PostState.getPostById(widget.postId)?.favoriteCount ?? _post.favoriteCount}',
                    )
                    .fontSize(12.sp)
                    .textColor(Colors.white)
                    .fontFamily(
                      GoogleFonts.quicksand(
                        fontWeight: FontWeight.w600,
                      ).fontFamily,
                    )
                    .fontWeight(FontWeight.w600),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
